home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / QD3DMath.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  33.8 KB  |  1,137 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DMath.a
  3. ;
  4. ;    Contains:    Math & matrix routines and definitions.                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__QD3DMATH__') = 'UNDEFINED' THEN
  18. __QD3DMATH__ SET 1
  19.  
  20.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  21.     include 'QD3D.a'
  22.     ENDIF
  23.  
  24. ; ******************************************************************************
  25. ; **                                                                             **
  26. ; **                            Constant Definitions                             **
  27. ; **                                                                             **
  28. ; ****************************************************************************
  29.  
  30. ; *  Real zero definition
  31.  
  32. ; *  Values of PI
  33.  
  34.  
  35.  
  36. ; ******************************************************************************
  37. ; **                                                                             **
  38. ; **                            Miscellaneous Functions                             **
  39. ; **                                                                             **
  40. ; ****************************************************************************
  41.  
  42.  
  43. ; ******************************************************************************
  44. ; **                                                                             **
  45. ; **                            Point and Vector Creation                         **
  46. ; **                                                                             **
  47. ; ****************************************************************************
  48.  
  49. ;
  50. ; extern TQ3Point2D *Q3Point2D_Set(TQ3Point2D *point2D, float x, float y)
  51. ;
  52.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  53.         IMPORT_CFM_FUNCTION Q3Point2D_Set
  54.     ENDIF
  55.  
  56. ;
  57. ; extern TQ3Param2D *Q3Param2D_Set(TQ3Param2D *param2D, float u, float v)
  58. ;
  59.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  60.         IMPORT_CFM_FUNCTION Q3Param2D_Set
  61.     ENDIF
  62.  
  63. ;
  64. ; extern TQ3Point3D *Q3Point3D_Set(TQ3Point3D *point3D, float x, float y, float z)
  65. ;
  66.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  67.         IMPORT_CFM_FUNCTION Q3Point3D_Set
  68.     ENDIF
  69.  
  70. ;
  71. ; extern TQ3RationalPoint3D *Q3RationalPoint3D_Set(TQ3RationalPoint3D *point3D, float x, float y, float w)
  72. ;
  73.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  74.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Set
  75.     ENDIF
  76.  
  77. ;
  78. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_Set(TQ3RationalPoint4D *point4D, float x, float y, float z, float w)
  79. ;
  80.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  81.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Set
  82.     ENDIF
  83.  
  84. ;
  85. ; extern TQ3Vector2D *Q3Vector2D_Set(TQ3Vector2D *vector2D, float x, float y)
  86. ;
  87.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  88.         IMPORT_CFM_FUNCTION Q3Vector2D_Set
  89.     ENDIF
  90.  
  91. ;
  92. ; extern TQ3Vector3D *Q3Vector3D_Set(TQ3Vector3D *vector3D, float x, float y, float z)
  93. ;
  94.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  95.         IMPORT_CFM_FUNCTION Q3Vector3D_Set
  96.     ENDIF
  97.  
  98. ;
  99. ; extern TQ3PolarPoint *Q3PolarPoint_Set(TQ3PolarPoint *polarPoint, float r, float theta)
  100. ;
  101.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  102.         IMPORT_CFM_FUNCTION Q3PolarPoint_Set
  103.     ENDIF
  104.  
  105. ;
  106. ; extern TQ3SphericalPoint *Q3SphericalPoint_Set(TQ3SphericalPoint *sphericalPoint, float rho, float theta, float phi)
  107. ;
  108.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  109.         IMPORT_CFM_FUNCTION Q3SphericalPoint_Set
  110.     ENDIF
  111.  
  112.  
  113. ; ******************************************************************************
  114. ; **                                                                             **
  115. ; **                    Point and Vector Dimension Conversion                     **
  116. ; **                                                                             **
  117. ; ****************************************************************************
  118.  
  119. ;
  120. ; extern TQ3Point3D *Q3Point2D_To3D(const TQ3Point2D *point2D, TQ3Point3D *result)
  121. ;
  122.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  123.         IMPORT_CFM_FUNCTION Q3Point2D_To3D
  124.     ENDIF
  125.  
  126. ;
  127. ; extern TQ3Point2D *Q3RationalPoint3D_To2D(const TQ3RationalPoint3D *point3D, TQ3Point2D *result)
  128. ;
  129.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  130.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_To2D
  131.     ENDIF
  132.  
  133. ;
  134. ; extern TQ3RationalPoint4D *Q3Point3D_To4D(const TQ3Point3D *point3D, TQ3RationalPoint4D *result)
  135. ;
  136.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  137.         IMPORT_CFM_FUNCTION Q3Point3D_To4D
  138.     ENDIF
  139.  
  140. ;
  141. ; extern TQ3Point3D *Q3RationalPoint4D_To3D(const TQ3RationalPoint4D *point4D, TQ3Point3D *result)
  142. ;
  143.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  144.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_To3D
  145.     ENDIF
  146.  
  147. ;
  148. ; extern TQ3Vector3D *Q3Vector2D_To3D(const TQ3Vector2D *vector2D, TQ3Vector3D *result)
  149. ;
  150.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  151.         IMPORT_CFM_FUNCTION Q3Vector2D_To3D
  152.     ENDIF
  153.  
  154. ;
  155. ; extern TQ3Vector2D *Q3Vector3D_To2D(const TQ3Vector3D *vector3D, TQ3Vector2D *result)
  156. ;
  157.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  158.         IMPORT_CFM_FUNCTION Q3Vector3D_To2D
  159.     ENDIF
  160.  
  161.  
  162. ; ******************************************************************************
  163. ; **                                                                             **
  164. ; **                            Point Subtraction                                 **
  165. ; **                                                                             **
  166. ; ****************************************************************************
  167.  
  168. ;
  169. ; extern TQ3Vector2D *Q3Point2D_Subtract(const TQ3Point2D *p1, const TQ3Point2D *p2, TQ3Vector2D *result)
  170. ;
  171.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  172.         IMPORT_CFM_FUNCTION Q3Point2D_Subtract
  173.     ENDIF
  174.  
  175. ;
  176. ; extern TQ3Vector2D *Q3Param2D_Subtract(const TQ3Param2D *p1, const TQ3Param2D *p2, TQ3Vector2D *result)
  177. ;
  178.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  179.         IMPORT_CFM_FUNCTION Q3Param2D_Subtract
  180.     ENDIF
  181.  
  182. ;
  183. ; extern TQ3Vector3D *Q3Point3D_Subtract(const TQ3Point3D *p1, const TQ3Point3D *p2, TQ3Vector3D *result)
  184. ;
  185.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  186.         IMPORT_CFM_FUNCTION Q3Point3D_Subtract
  187.     ENDIF
  188.  
  189.  
  190. ; ******************************************************************************
  191. ; **                                                                             **
  192. ; **                            Point Distance                                     **
  193. ; **                                                                             **
  194. ; ****************************************************************************
  195.  
  196. ;
  197. ; extern float Q3Point2D_Distance(const TQ3Point2D *p1, const TQ3Point2D *p2)
  198. ;
  199.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  200.         IMPORT_CFM_FUNCTION Q3Point2D_Distance
  201.     ENDIF
  202.  
  203. ;
  204. ; extern float Q3Point2D_DistanceSquared(const TQ3Point2D *p1, const TQ3Point2D *p2)
  205. ;
  206.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  207.         IMPORT_CFM_FUNCTION Q3Point2D_DistanceSquared
  208.     ENDIF
  209.  
  210.  
  211. ;
  212. ; extern float Q3Param2D_Distance(const TQ3Param2D *p1, const TQ3Param2D *p2)
  213. ;
  214.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION Q3Param2D_Distance
  216.     ENDIF
  217.  
  218. ;
  219. ; extern float Q3Param2D_DistanceSquared(const TQ3Param2D *p1, const TQ3Param2D *p2)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  222.         IMPORT_CFM_FUNCTION Q3Param2D_DistanceSquared
  223.     ENDIF
  224.  
  225.  
  226. ;
  227. ; extern float Q3RationalPoint3D_Distance(const TQ3RationalPoint3D *p1, const TQ3RationalPoint3D *p2)
  228. ;
  229.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  230.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Distance
  231.     ENDIF
  232.  
  233. ;
  234. ; extern float Q3RationalPoint3D_DistanceSquared(const TQ3RationalPoint3D *p1, const TQ3RationalPoint3D *p2)
  235. ;
  236.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  237.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_DistanceSquared
  238.     ENDIF
  239.  
  240.  
  241. ;
  242. ; extern float Q3Point3D_Distance(const TQ3Point3D *p1, const TQ3Point3D *p2)
  243. ;
  244.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  245.         IMPORT_CFM_FUNCTION Q3Point3D_Distance
  246.     ENDIF
  247.  
  248. ;
  249. ; extern float Q3Point3D_DistanceSquared(const TQ3Point3D *p1, const TQ3Point3D *p2)
  250. ;
  251.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  252.         IMPORT_CFM_FUNCTION Q3Point3D_DistanceSquared
  253.     ENDIF
  254.  
  255.  
  256. ;
  257. ; extern float Q3RationalPoint4D_Distance(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2)
  258. ;
  259.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Distance
  261.     ENDIF
  262.  
  263. ;
  264. ; extern float Q3RationalPoint4D_DistanceSquared(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  267.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_DistanceSquared
  268.     ENDIF
  269.  
  270.  
  271. ; ******************************************************************************
  272. ; **                                                                             **
  273. ; **                            Point Relative Ratio                             **
  274. ; **                                                                             **
  275. ; ****************************************************************************
  276.  
  277. ;
  278. ; extern TQ3Point2D *Q3Point2D_RRatio(const TQ3Point2D *p1, const TQ3Point2D *p2, float r1, float r2, TQ3Point2D *result)
  279. ;
  280.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  281.         IMPORT_CFM_FUNCTION Q3Point2D_RRatio
  282.     ENDIF
  283.  
  284. ;
  285. ; extern TQ3Param2D *Q3Param2D_RRatio(const TQ3Param2D *p1, const TQ3Param2D *p2, float r1, float r2, TQ3Param2D *result)
  286. ;
  287.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  288.         IMPORT_CFM_FUNCTION Q3Param2D_RRatio
  289.     ENDIF
  290.  
  291. ;
  292. ; extern TQ3Point3D *Q3Point3D_RRatio(const TQ3Point3D *p1, const TQ3Point3D *p2, float r1, float r2, TQ3Point3D *result)
  293. ;
  294.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  295.         IMPORT_CFM_FUNCTION Q3Point3D_RRatio
  296.     ENDIF
  297.  
  298. ;
  299. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_RRatio(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2, float r1, float r2, TQ3RationalPoint4D *result)
  300. ;
  301.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  302.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_RRatio
  303.     ENDIF
  304.  
  305.  
  306. ; ******************************************************************************
  307. ; **                                                                             **
  308. ; **                    Point / Vector Addition    & Subtraction                     **
  309. ; **                                                                             **
  310. ; ****************************************************************************
  311.  
  312. ;
  313. ; extern TQ3Point2D *Q3Point2D_Vector2D_Add(const TQ3Point2D *point2D, const TQ3Vector2D *vector2D, TQ3Point2D *result)
  314. ;
  315.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  316.         IMPORT_CFM_FUNCTION Q3Point2D_Vector2D_Add
  317.     ENDIF
  318.  
  319. ;
  320. ; extern TQ3Param2D *Q3Param2D_Vector2D_Add(const TQ3Param2D *param2D, const TQ3Vector2D *vector2D, TQ3Param2D *result)
  321. ;
  322.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION Q3Param2D_Vector2D_Add
  324.     ENDIF
  325.  
  326. ;
  327. ; extern TQ3Point3D *Q3Point3D_Vector3D_Add(const TQ3Point3D *point3D, const TQ3Vector3D *vector3D, TQ3Point3D *result)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  330.         IMPORT_CFM_FUNCTION Q3Point3D_Vector3D_Add
  331.     ENDIF
  332.  
  333. ;
  334. ; extern TQ3Point2D *Q3Point2D_Vector2D_Subtract(const TQ3Point2D *point2D, const TQ3Vector2D *vector2D, TQ3Point2D *result)
  335. ;
  336.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  337.         IMPORT_CFM_FUNCTION Q3Point2D_Vector2D_Subtract
  338.     ENDIF
  339.  
  340. ;
  341. ; extern TQ3Param2D *Q3Param2D_Vector2D_Subtract(const TQ3Param2D *param2D, const TQ3Vector2D *vector2D, TQ3Param2D *result)
  342. ;
  343.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  344.         IMPORT_CFM_FUNCTION Q3Param2D_Vector2D_Subtract
  345.     ENDIF
  346.  
  347. ;
  348. ; extern TQ3Point3D *Q3Point3D_Vector3D_Subtract(const TQ3Point3D *point3D, const TQ3Vector3D *vector3D, TQ3Point3D *result)
  349. ;
  350.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  351.         IMPORT_CFM_FUNCTION Q3Point3D_Vector3D_Subtract
  352.     ENDIF
  353.  
  354.  
  355. ; ******************************************************************************
  356. ; **                                                                             **
  357. ; **                                Vector Scale                                 **
  358. ; **                                                                             **
  359. ; ****************************************************************************
  360.  
  361. ;
  362. ; extern TQ3Vector2D *Q3Vector2D_Scale(const TQ3Vector2D *vector2D, float scalar, TQ3Vector2D *result)
  363. ;
  364.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  365.         IMPORT_CFM_FUNCTION Q3Vector2D_Scale
  366.     ENDIF
  367.  
  368. ;
  369. ; extern TQ3Vector3D *Q3Vector3D_Scale(const TQ3Vector3D *vector3D, float scalar, TQ3Vector3D *result)
  370. ;
  371.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  372.         IMPORT_CFM_FUNCTION Q3Vector3D_Scale
  373.     ENDIF
  374.  
  375.  
  376. ; ******************************************************************************
  377. ; **                                                                             **
  378. ; **                                Vector Length                                 **
  379. ; **                                                                             **
  380. ; ****************************************************************************
  381.  
  382. ;
  383. ; extern float Q3Vector2D_Length(const TQ3Vector2D *vector2D)
  384. ;
  385.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  386.         IMPORT_CFM_FUNCTION Q3Vector2D_Length
  387.     ENDIF
  388.  
  389. ;
  390. ; extern float Q3Vector3D_Length(const TQ3Vector3D *vector3D)
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  393.         IMPORT_CFM_FUNCTION Q3Vector3D_Length
  394.     ENDIF
  395.  
  396.  
  397. ; ******************************************************************************
  398. ; **                                                                             **
  399. ; **                                Vector Normalize                             **
  400. ; **                                                                             **
  401. ; ****************************************************************************
  402.  
  403. ;
  404. ; extern TQ3Vector2D *Q3Vector2D_Normalize(const TQ3Vector2D *vector2D, TQ3Vector2D *result)
  405. ;
  406.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  407.         IMPORT_CFM_FUNCTION Q3Vector2D_Normalize
  408.     ENDIF
  409.  
  410. ;
  411. ; extern TQ3Vector3D *Q3Vector3D_Normalize(const TQ3Vector3D *vector3D, TQ3Vector3D *result)
  412. ;
  413.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  414.         IMPORT_CFM_FUNCTION Q3Vector3D_Normalize
  415.     ENDIF
  416.  
  417.  
  418. ; ******************************************************************************
  419. ; **                                                                             **
  420. ; **                    Vector/Vector Addition and Subtraction                     **
  421. ; **                                                                             **
  422. ; ****************************************************************************
  423.  
  424. ;
  425. ; extern TQ3Vector2D *Q3Vector2D_Add(const TQ3Vector2D *v1, const TQ3Vector2D *v2, TQ3Vector2D *result)
  426. ;
  427.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  428.         IMPORT_CFM_FUNCTION Q3Vector2D_Add
  429.     ENDIF
  430.  
  431. ;
  432. ; extern TQ3Vector3D *Q3Vector3D_Add(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  433. ;
  434.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  435.         IMPORT_CFM_FUNCTION Q3Vector3D_Add
  436.     ENDIF
  437.  
  438.  
  439. ;
  440. ; extern TQ3Vector2D *Q3Vector2D_Subtract(const TQ3Vector2D *v1, const TQ3Vector2D *v2, TQ3Vector2D *result)
  441. ;
  442.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  443.         IMPORT_CFM_FUNCTION Q3Vector2D_Subtract
  444.     ENDIF
  445.  
  446. ;
  447. ; extern TQ3Vector3D *Q3Vector3D_Subtract(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  448. ;
  449.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  450.         IMPORT_CFM_FUNCTION Q3Vector3D_Subtract
  451.     ENDIF
  452.  
  453.  
  454. ; ******************************************************************************
  455. ; **                                                                             **
  456. ; **                                Cross Product                                 **
  457. ; **                                                                             **
  458. ; ****************************************************************************
  459.  
  460. ;
  461. ; extern float Q3Vector2D_Cross(const TQ3Vector2D *v1, const TQ3Vector2D *v2)
  462. ;
  463.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  464.         IMPORT_CFM_FUNCTION Q3Vector2D_Cross
  465.     ENDIF
  466.  
  467. ;
  468. ; extern TQ3Vector3D *Q3Vector3D_Cross(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  469. ;
  470.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  471.         IMPORT_CFM_FUNCTION Q3Vector3D_Cross
  472.     ENDIF
  473.  
  474. ;
  475. ; extern TQ3Vector3D *Q3Point3D_CrossProductTri(const TQ3Point3D *point1, const TQ3Point3D *point2, const TQ3Point3D *point3, TQ3Vector3D *crossVector)
  476. ;
  477.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  478.         IMPORT_CFM_FUNCTION Q3Point3D_CrossProductTri
  479.     ENDIF
  480.  
  481.  
  482. ; ******************************************************************************
  483. ; **                                                                             **
  484. ; **                                Dot Product                                     **
  485. ; **                                                                             **
  486. ; ****************************************************************************
  487.  
  488. ;
  489. ; extern float Q3Vector2D_Dot(const TQ3Vector2D *v1, const TQ3Vector2D *v2)
  490. ;
  491.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION Q3Vector2D_Dot
  493.     ENDIF
  494.  
  495. ;
  496. ; extern float Q3Vector3D_Dot(const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  497. ;
  498.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  499.         IMPORT_CFM_FUNCTION Q3Vector3D_Dot
  500.     ENDIF
  501.  
  502.  
  503. ; ******************************************************************************
  504. ; **                                                                             **
  505. ; **                        Point and Vector Transformation                         **
  506. ; **                                                                             **
  507. ; ****************************************************************************
  508.  
  509. ;
  510. ; extern TQ3Vector2D *Q3Vector2D_Transform(const TQ3Vector2D *vector2D, const TQ3Matrix3x3 *matrix3x3, TQ3Vector2D *result)
  511. ;
  512.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  513.         IMPORT_CFM_FUNCTION Q3Vector2D_Transform
  514.     ENDIF
  515.  
  516. ;
  517. ; extern TQ3Vector3D *Q3Vector3D_Transform(const TQ3Vector3D *vector3D, const TQ3Matrix4x4 *matrix4x4, TQ3Vector3D *result)
  518. ;
  519.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  520.         IMPORT_CFM_FUNCTION Q3Vector3D_Transform
  521.     ENDIF
  522.  
  523. ;
  524. ; extern TQ3Point2D *Q3Point2D_Transform(const TQ3Point2D *point2D, const TQ3Matrix3x3 *matrix3x3, TQ3Point2D *result)
  525. ;
  526.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  527.         IMPORT_CFM_FUNCTION Q3Point2D_Transform
  528.     ENDIF
  529.  
  530. ;
  531. ; extern TQ3Param2D *Q3Param2D_Transform(const TQ3Param2D *param2D, const TQ3Matrix3x3 *matrix3x3, TQ3Param2D *result)
  532. ;
  533.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  534.         IMPORT_CFM_FUNCTION Q3Param2D_Transform
  535.     ENDIF
  536.  
  537. ;
  538. ; extern TQ3Point3D *Q3Point3D_Transform(const TQ3Point3D *point3D, const TQ3Matrix4x4 *matrix4x4, TQ3Point3D *result)
  539. ;
  540.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  541.         IMPORT_CFM_FUNCTION Q3Point3D_Transform
  542.     ENDIF
  543.  
  544. ;
  545. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_Transform(const TQ3RationalPoint4D *point4D, const TQ3Matrix4x4 *matrix4x4, TQ3RationalPoint4D *result)
  546. ;
  547.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Transform
  549.     ENDIF
  550.  
  551. ;
  552. ; extern TQ3Status Q3Point3D_To3DTransformArray(const TQ3Point3D *inPoint3D, const TQ3Matrix4x4 *matrix, TQ3Point3D *outPoint3D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION Q3Point3D_To3DTransformArray
  556.     ENDIF
  557.  
  558. ;
  559. ; extern TQ3Status Q3Point3D_To4DTransformArray(const TQ3Point3D *inPoint3D, const TQ3Matrix4x4 *matrix, TQ3RationalPoint4D *outPoint4D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION Q3Point3D_To4DTransformArray
  563.     ENDIF
  564.  
  565. ;
  566. ; extern TQ3Status Q3RationalPoint4D_To4DTransformArray(const TQ3RationalPoint4D *inPoint4D, const TQ3Matrix4x4 *matrix, TQ3RationalPoint4D *outPoint4D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  567. ;
  568.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_To4DTransformArray
  570.     ENDIF
  571.  
  572.  
  573. ; ******************************************************************************
  574. ; **                                                                             **
  575. ; **                                Vector Negation                                 **
  576. ; **                                                                             **
  577. ; ****************************************************************************
  578.  
  579. ;
  580. ; extern TQ3Vector2D *Q3Vector2D_Negate(const TQ3Vector2D *vector2D, TQ3Vector2D *result)
  581. ;
  582.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION Q3Vector2D_Negate
  584.     ENDIF
  585.  
  586. ;
  587. ; extern TQ3Vector3D *Q3Vector3D_Negate(const TQ3Vector3D *vector3D, TQ3Vector3D *result)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  590.         IMPORT_CFM_FUNCTION Q3Vector3D_Negate
  591.     ENDIF
  592.  
  593.  
  594. ; ******************************************************************************
  595. ; **                                                                             **
  596. ; **                    Point conversion from cartesian to polar                 **
  597. ; **                                                                             **
  598. ; ****************************************************************************
  599.  
  600. ;
  601. ; extern TQ3PolarPoint *Q3Point2D_ToPolar(const TQ3Point2D *point2D, TQ3PolarPoint *result)
  602. ;
  603.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  604.         IMPORT_CFM_FUNCTION Q3Point2D_ToPolar
  605.     ENDIF
  606.  
  607. ;
  608. ; extern TQ3Point2D *Q3PolarPoint_ToPoint2D(const TQ3PolarPoint *polarPoint, TQ3Point2D *result)
  609. ;
  610.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  611.         IMPORT_CFM_FUNCTION Q3PolarPoint_ToPoint2D
  612.     ENDIF
  613.  
  614. ;
  615. ; extern TQ3SphericalPoint *Q3Point3D_ToSpherical(const TQ3Point3D *point3D, TQ3SphericalPoint *result)
  616. ;
  617.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  618.         IMPORT_CFM_FUNCTION Q3Point3D_ToSpherical
  619.     ENDIF
  620.  
  621. ;
  622. ; extern TQ3Point3D *Q3SphericalPoint_ToPoint3D(const TQ3SphericalPoint *sphericalPoint, TQ3Point3D *result)
  623. ;
  624.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  625.         IMPORT_CFM_FUNCTION Q3SphericalPoint_ToPoint3D
  626.     ENDIF
  627.  
  628.  
  629. ; ******************************************************************************
  630. ; **                                                                             **
  631. ; **                            Point Affine Combinations                         **
  632. ; **                                                                             **
  633. ; ****************************************************************************
  634.  
  635. ;
  636. ; extern TQ3Point2D *Q3Point2D_AffineComb(const TQ3Point2D *points2D, const float *weights, unsigned long nPoints, TQ3Point2D *result)
  637. ;
  638.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  639.         IMPORT_CFM_FUNCTION Q3Point2D_AffineComb
  640.     ENDIF
  641.  
  642. ;
  643. ; extern TQ3Param2D *Q3Param2D_AffineComb(const TQ3Param2D *params2D, const float *weights, unsigned long nPoints, TQ3Param2D *result)
  644. ;
  645.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  646.         IMPORT_CFM_FUNCTION Q3Param2D_AffineComb
  647.     ENDIF
  648.  
  649. ;
  650. ; extern TQ3RationalPoint3D *Q3RationalPoint3D_AffineComb(const TQ3RationalPoint3D *points3D, const float *weights, unsigned long numPoints, TQ3RationalPoint3D *result)
  651. ;
  652.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  653.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_AffineComb
  654.     ENDIF
  655.  
  656. ;
  657. ; extern TQ3Point3D *Q3Point3D_AffineComb(const TQ3Point3D *points3D, const float *weights, unsigned long numPoints, TQ3Point3D *result)
  658. ;
  659.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  660.         IMPORT_CFM_FUNCTION Q3Point3D_AffineComb
  661.     ENDIF
  662.  
  663. ;
  664. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_AffineComb(const TQ3RationalPoint4D *points4D, const float *weights, unsigned long numPoints, TQ3RationalPoint4D *result)
  665. ;
  666.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  667.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_AffineComb
  668.     ENDIF
  669.  
  670.  
  671. ; ******************************************************************************
  672. ; **                                                                             **
  673. ; **                                Matrix Functions                             **
  674. ; **                                                                             **
  675. ; ****************************************************************************
  676.  
  677. ;
  678. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Copy(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  679. ;
  680.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  681.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Copy
  682.     ENDIF
  683.  
  684. ;
  685. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Copy(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  686. ;
  687.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  688.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Copy
  689.     ENDIF
  690.  
  691.  
  692. ;
  693. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetIdentity(TQ3Matrix3x3 *matrix3x3)
  694. ;
  695.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  696.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetIdentity
  697.     ENDIF
  698.  
  699. ;
  700. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetIdentity(TQ3Matrix4x4 *matrix4x4)
  701. ;
  702.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  703.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetIdentity
  704.     ENDIF
  705.  
  706.  
  707. ;
  708. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Transpose(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  709. ;
  710.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  711.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Transpose
  712.     ENDIF
  713.  
  714. ;
  715. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Transpose(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  716. ;
  717.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  718.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Transpose
  719.     ENDIF
  720.  
  721.  
  722. ;
  723. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Invert(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  724. ;
  725.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  726.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Invert
  727.     ENDIF
  728.  
  729. ;
  730. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Invert(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  731. ;
  732.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  733.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Invert
  734.     ENDIF
  735.  
  736.  
  737. ;
  738. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Adjoint(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  739. ;
  740.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  741.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Adjoint
  742.     ENDIF
  743.  
  744.  
  745. ;
  746. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Multiply(const TQ3Matrix3x3 *matrixA, const TQ3Matrix3x3 *matrixB, TQ3Matrix3x3 *result)
  747. ;
  748.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  749.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Multiply
  750.     ENDIF
  751.  
  752. ;
  753. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Multiply(const TQ3Matrix4x4 *matrixA, const TQ3Matrix4x4 *matrixB, TQ3Matrix4x4 *result)
  754. ;
  755.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  756.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Multiply
  757.     ENDIF
  758.  
  759.  
  760. ;
  761. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetTranslate(TQ3Matrix3x3 *matrix3x3, float xTrans, float yTrans)
  762. ;
  763.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetTranslate
  765.     ENDIF
  766.  
  767. ;
  768. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetScale(TQ3Matrix3x3 *matrix3x3, float xScale, float yScale)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  771.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetScale
  772.     ENDIF
  773.  
  774.  
  775. ;
  776. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetRotateAboutPoint(TQ3Matrix3x3 *matrix3x3, const TQ3Point2D *origin, float angle)
  777. ;
  778.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  779.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetRotateAboutPoint
  780.     ENDIF
  781.  
  782. ;
  783. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetTranslate(TQ3Matrix4x4 *matrix4x4, float xTrans, float yTrans, float zTrans)
  784. ;
  785.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  786.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetTranslate
  787.     ENDIF
  788.  
  789. ;
  790. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetScale(TQ3Matrix4x4 *matrix4x4, float xScale, float yScale, float zScale)
  791. ;
  792.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  793.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetScale
  794.     ENDIF
  795.  
  796.  
  797. ;
  798. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateAboutPoint(TQ3Matrix4x4 *matrix4x4, const TQ3Point3D *origin, float xAngle, float yAngle, float zAngle)
  799. ;
  800.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  801.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateAboutPoint
  802.     ENDIF
  803.  
  804. ;
  805. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateAboutAxis(TQ3Matrix4x4 *matrix4x4, const TQ3Point3D *origin, const TQ3Vector3D *orientation, float angle)
  806. ;
  807.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  808.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateAboutAxis
  809.     ENDIF
  810.  
  811. ;
  812. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_X(TQ3Matrix4x4 *matrix4x4, float angle)
  813. ;
  814.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  815.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_X
  816.     ENDIF
  817.  
  818. ;
  819. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_Y(TQ3Matrix4x4 *matrix4x4, float angle)
  820. ;
  821.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  822.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_Y
  823.     ENDIF
  824.  
  825. ;
  826. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_Z(TQ3Matrix4x4 *matrix4x4, float angle)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_Z
  830.     ENDIF
  831.  
  832. ;
  833. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_XYZ(TQ3Matrix4x4 *matrix4x4, float xAngle, float yAngle, float zAngle)
  834. ;
  835.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  836.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_XYZ
  837.     ENDIF
  838.  
  839. ;
  840. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateVectorToVector(TQ3Matrix4x4 *matrix4x4, const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  841. ;
  842.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  843.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateVectorToVector
  844.     ENDIF
  845.  
  846. ;
  847. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetQuaternion(TQ3Matrix4x4 *matrix, const TQ3Quaternion *quaternion)
  848. ;
  849.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  850.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetQuaternion
  851.     ENDIF
  852.  
  853. ;
  854. ; extern float Q3Matrix3x3_Determinant(const TQ3Matrix3x3 *matrix3x3)
  855. ;
  856.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  857.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Determinant
  858.     ENDIF
  859.  
  860. ;
  861. ; extern float Q3Matrix4x4_Determinant(const TQ3Matrix4x4 *matrix4x4)
  862. ;
  863.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  864.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Determinant
  865.     ENDIF
  866.  
  867.  
  868. ; ******************************************************************************
  869. ; **                                                                             **
  870. ; **                                Quaternion Routines                             **
  871. ; **                                                                             **
  872. ; ****************************************************************************
  873.  
  874. ;
  875. ; extern TQ3Quaternion *Q3Quaternion_Set(TQ3Quaternion *quaternion, float w, float x, float y, float z)
  876. ;
  877.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  878.         IMPORT_CFM_FUNCTION Q3Quaternion_Set
  879.     ENDIF
  880.  
  881. ;
  882. ; extern TQ3Quaternion *Q3Quaternion_SetIdentity(TQ3Quaternion *quaternion)
  883. ;
  884.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  885.         IMPORT_CFM_FUNCTION Q3Quaternion_SetIdentity
  886.     ENDIF
  887.  
  888. ;
  889. ; extern TQ3Quaternion *Q3Quaternion_Copy(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  890. ;
  891.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  892.         IMPORT_CFM_FUNCTION Q3Quaternion_Copy
  893.     ENDIF
  894.  
  895. ;
  896. ; extern TQ3Boolean Q3Quaternion_IsIdentity(const TQ3Quaternion *quaternion)
  897. ;
  898.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  899.         IMPORT_CFM_FUNCTION Q3Quaternion_IsIdentity
  900.     ENDIF
  901.  
  902. ;
  903. ; extern TQ3Quaternion *Q3Quaternion_Invert(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  904. ;
  905.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  906.         IMPORT_CFM_FUNCTION Q3Quaternion_Invert
  907.     ENDIF
  908.  
  909. ;
  910. ; extern TQ3Quaternion *Q3Quaternion_Normalize(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  911. ;
  912.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  913.         IMPORT_CFM_FUNCTION Q3Quaternion_Normalize
  914.     ENDIF
  915.  
  916. ;
  917. ; extern float Q3Quaternion_Dot(const TQ3Quaternion *q1, const TQ3Quaternion *q2)
  918. ;
  919.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  920.         IMPORT_CFM_FUNCTION Q3Quaternion_Dot
  921.     ENDIF
  922.  
  923. ;
  924. ; extern TQ3Quaternion *Q3Quaternion_Multiply(const TQ3Quaternion *q1, const TQ3Quaternion *q2, TQ3Quaternion *result)
  925. ;
  926.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  927.         IMPORT_CFM_FUNCTION Q3Quaternion_Multiply
  928.     ENDIF
  929.  
  930. ;
  931. ; extern TQ3Quaternion *Q3Quaternion_SetRotateAboutAxis(TQ3Quaternion *quaternion, const TQ3Vector3D *axis, float angle)
  932. ;
  933.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  934.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotateAboutAxis
  935.     ENDIF
  936.  
  937. ;
  938. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_XYZ(TQ3Quaternion *quaternion, float xAngle, float yAngle, float zAngle)
  939. ;
  940.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  941.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_XYZ
  942.     ENDIF
  943.  
  944. ;
  945. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_X(TQ3Quaternion *quaternion, float angle)
  946. ;
  947.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  948.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_X
  949.     ENDIF
  950.  
  951. ;
  952. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_Y(TQ3Quaternion *quaternion, float angle)
  953. ;
  954.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  955.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_Y
  956.     ENDIF
  957.  
  958. ;
  959. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_Z(TQ3Quaternion *quaternion, float angle)
  960. ;
  961.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  962.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_Z
  963.     ENDIF
  964.  
  965.  
  966. ;
  967. ; extern TQ3Quaternion *Q3Quaternion_SetMatrix(TQ3Quaternion *quaternion, const TQ3Matrix4x4 *matrix)
  968. ;
  969.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  970.         IMPORT_CFM_FUNCTION Q3Quaternion_SetMatrix
  971.     ENDIF
  972.  
  973. ;
  974. ; extern TQ3Quaternion *Q3Quaternion_SetRotateVectorToVector(TQ3Quaternion *quaternion, const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  975. ;
  976.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  977.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotateVectorToVector
  978.     ENDIF
  979.  
  980. ;
  981. ; extern TQ3Quaternion *Q3Quaternion_MatchReflection(const TQ3Quaternion *q1, const TQ3Quaternion *q2, TQ3Quaternion *result)
  982. ;
  983.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  984.         IMPORT_CFM_FUNCTION Q3Quaternion_MatchReflection
  985.     ENDIF
  986.  
  987. ;
  988. ; extern TQ3Quaternion *Q3Quaternion_InterpolateFast(const TQ3Quaternion *q1, const TQ3Quaternion *q2, float t, TQ3Quaternion *result)
  989. ;
  990.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  991.         IMPORT_CFM_FUNCTION Q3Quaternion_InterpolateFast
  992.     ENDIF
  993.  
  994. ;
  995. ; extern TQ3Quaternion *Q3Quaternion_InterpolateLinear(const TQ3Quaternion *q1, const TQ3Quaternion *q2, float t, TQ3Quaternion *result)
  996. ;
  997.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  998.         IMPORT_CFM_FUNCTION Q3Quaternion_InterpolateLinear
  999.     ENDIF
  1000.  
  1001. ;
  1002. ; extern TQ3Vector3D *Q3Vector3D_TransformQuaternion(const TQ3Vector3D *vector3D, const TQ3Quaternion *quaternion, TQ3Vector3D *result)
  1003. ;
  1004.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1005.         IMPORT_CFM_FUNCTION Q3Vector3D_TransformQuaternion
  1006.     ENDIF
  1007.  
  1008. ;
  1009. ; extern TQ3Point3D *Q3Point3D_TransformQuaternion(const TQ3Point3D *point3D, const TQ3Quaternion *quaternion, TQ3Point3D *result)
  1010. ;
  1011.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1012.         IMPORT_CFM_FUNCTION Q3Point3D_TransformQuaternion
  1013.     ENDIF
  1014.  
  1015.  
  1016. ; ******************************************************************************
  1017. ; **                                                                             **
  1018. ; **                                Volume Routines                                 **
  1019. ; **                                                                             **
  1020. ; ****************************************************************************
  1021.  
  1022. ;
  1023. ; extern TQ3BoundingBox *Q3BoundingBox_Copy(const TQ3BoundingBox *src, TQ3BoundingBox *dest)
  1024. ;
  1025.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1026.         IMPORT_CFM_FUNCTION Q3BoundingBox_Copy
  1027.     ENDIF
  1028.  
  1029. ;
  1030. ; extern TQ3BoundingBox *Q3BoundingBox_Union(const TQ3BoundingBox *v1, const TQ3BoundingBox *v2, TQ3BoundingBox *result)
  1031. ;
  1032.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1033.         IMPORT_CFM_FUNCTION Q3BoundingBox_Union
  1034.     ENDIF
  1035.  
  1036. ;
  1037. ; extern TQ3BoundingBox *Q3BoundingBox_Set(TQ3BoundingBox *bBox, const TQ3Point3D *min, const TQ3Point3D *max, TQ3Boolean isEmpty)
  1038. ;
  1039.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1040.         IMPORT_CFM_FUNCTION Q3BoundingBox_Set
  1041.     ENDIF
  1042.  
  1043. ;
  1044. ; extern TQ3BoundingBox *Q3BoundingBox_UnionPoint3D(const TQ3BoundingBox *bBox, const TQ3Point3D *point3D, TQ3BoundingBox *result)
  1045. ;
  1046.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1047.         IMPORT_CFM_FUNCTION Q3BoundingBox_UnionPoint3D
  1048.     ENDIF
  1049.  
  1050. ;
  1051. ; extern TQ3BoundingBox *Q3BoundingBox_UnionRationalPoint4D(const TQ3BoundingBox *bBox, const TQ3RationalPoint4D *point4D, TQ3BoundingBox *result)
  1052. ;
  1053.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1054.         IMPORT_CFM_FUNCTION Q3BoundingBox_UnionRationalPoint4D
  1055.     ENDIF
  1056.  
  1057. ;
  1058. ; extern TQ3BoundingBox *Q3BoundingBox_SetFromPoints3D(TQ3BoundingBox *bBox, const TQ3Point3D *points3D, unsigned long numPoints, unsigned long structSize)
  1059. ;
  1060.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1061.         IMPORT_CFM_FUNCTION Q3BoundingBox_SetFromPoints3D
  1062.     ENDIF
  1063.  
  1064. ;
  1065. ; extern TQ3BoundingBox *Q3BoundingBox_SetFromRationalPoints4D(TQ3BoundingBox *bBox, const TQ3RationalPoint4D *points4D, unsigned long numPoints, unsigned long structSize)
  1066. ;
  1067.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1068.         IMPORT_CFM_FUNCTION Q3BoundingBox_SetFromRationalPoints4D
  1069.     ENDIF
  1070.  
  1071.  
  1072. ; ******************************************************************************
  1073. ; **                                                                             **
  1074. ; **                                Sphere Routines                                 **
  1075. ; **                                                                             **
  1076. ; ****************************************************************************
  1077.  
  1078. ;
  1079. ; extern TQ3BoundingSphere *Q3BoundingSphere_Copy(const TQ3BoundingSphere *src, TQ3BoundingSphere *dest)
  1080. ;
  1081.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1082.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Copy
  1083.     ENDIF
  1084.  
  1085. ;
  1086. ; extern TQ3BoundingSphere *Q3BoundingSphere_Union(const TQ3BoundingSphere *s1, const TQ3BoundingSphere *s2, TQ3BoundingSphere *result)
  1087. ;
  1088.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1089.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Union
  1090.     ENDIF
  1091.  
  1092. ;
  1093. ; extern TQ3BoundingSphere *Q3BoundingSphere_Set(TQ3BoundingSphere *bSphere, const TQ3Point3D *origin, float radius, TQ3Boolean isEmpty)
  1094. ;
  1095.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1096.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Set
  1097.     ENDIF
  1098.  
  1099. ;
  1100. ; extern TQ3BoundingSphere *Q3BoundingSphere_UnionPoint3D(const TQ3BoundingSphere *bSphere, const TQ3Point3D *point3D, TQ3BoundingSphere *result)
  1101. ;
  1102.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1103.         IMPORT_CFM_FUNCTION Q3BoundingSphere_UnionPoint3D
  1104.     ENDIF
  1105.  
  1106. ;
  1107. ; extern TQ3BoundingSphere *Q3BoundingSphere_UnionRationalPoint4D(const TQ3BoundingSphere *bSphere, const TQ3RationalPoint4D *point4D, TQ3BoundingSphere *result)
  1108. ;
  1109.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1110.         IMPORT_CFM_FUNCTION Q3BoundingSphere_UnionRationalPoint4D
  1111.     ENDIF
  1112.  
  1113.  
  1114. ;
  1115. ; extern TQ3BoundingSphere *Q3BoundingSphere_SetFromPoints3D(TQ3BoundingSphere *bSphere, const TQ3Point3D *points3D, unsigned long numPoints, unsigned long structSize)
  1116. ;
  1117.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1118.         IMPORT_CFM_FUNCTION Q3BoundingSphere_SetFromPoints3D
  1119.     ENDIF
  1120.  
  1121. ;
  1122. ; extern TQ3BoundingSphere *Q3BoundingSphere_SetFromRationalPoints4D(TQ3BoundingSphere *bSphere, const TQ3RationalPoint4D *points4D, unsigned long numPoints, unsigned long structSize)
  1123. ;
  1124.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1125.         IMPORT_CFM_FUNCTION Q3BoundingSphere_SetFromRationalPoints4D
  1126.     ENDIF
  1127.  
  1128.  
  1129.  
  1130.  
  1131.     ENDIF ; __QD3DMATH__ 
  1132.  
  1133.